{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b0918451",
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "\n",
    "key = \"57df1430ab280a5c21b76fb658c08044\"\n",
    "\n",
    "def geocode(address,city=None,batch=None,sig=None) ->dict:\n",
    "    \"\"\"获取地理编码\"\"\"\n",
    "    url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "    parmas = {\n",
    "        \"key\": key,\n",
    "        \"address\": address,\n",
    "        \"city\": city,\n",
    "        \"batch\": batch,\n",
    "        \"sig\": sig,\n",
    "        \"output\": \"json\"\n",
    "    }\n",
    "    response = requests.get(url,params=parmas)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "61939bc6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省广州市从化区南方学院',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '020',\n",
       "   'city': '广州市',\n",
       "   'district': '从化区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440117',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '113.679000,23.633941',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geocode(\"广州南方学院\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "9398b929",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679000,23.633941'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "location = geocode(\"广州南方学院\")[\"geocodes\"][0][\"location\"]\n",
    "location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "f4b28691",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.763124,23.625183'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "location = geocode(\"广东省广州市温泉镇石门国家森林公园\")[\"geocodes\"][0][\"location\"]\n",
    "location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "1b757330",
   "metadata": {},
   "outputs": [],
   "source": [
    "def regeocode(location,batch=None,sig=None) ->dict:\n",
    "    \"\"\"获取逆地理编码\"\"\"\n",
    "    url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "    parmas = {\n",
    "        \"key\": key,\n",
    "        \"location\": location,\n",
    "        \"batch\": batch,\n",
    "        \"sig\": sig,\n",
    "        \"output\": \"json\"\n",
    "    }\n",
    "    response = requests.get(url,params=parmas)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e5c37cdc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440117',\n",
       "   'district': '从化区',\n",
       "   'towncode': '440117100000',\n",
       "   'streetNumber': {'number': [],\n",
       "    'direction': [],\n",
       "    'distance': [],\n",
       "    'street': []},\n",
       "   'country': '中国',\n",
       "   'township': '温泉镇',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'formatted_address': '广东省广州市从化区温泉镇934县道石门国家森林公园'},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "regeocode(location)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "46ec3b68",
   "metadata": {},
   "outputs": [],
   "source": [
    "def walking(origin,destination,sig=None) ->dict:\n",
    "    \"\"\"步行路径规划\"\"\"\n",
    "    url = \"https://restapi.amap.com/v3/direction/walking?parameters\"\n",
    "    parmas = {\n",
    "        \"key\": key,\n",
    "        \"origin\": origin,\n",
    "        \"destination\": destination,\n",
    "        \"sig\": sig,\n",
    "        \"output\": \"json\"\n",
    "    }\n",
    "    response = requests.get(url,params=parmas)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "faf8c2c3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '113.679000,23.633941',\n",
       "  'destination': '113.763124,23.625183',\n",
       "  'paths': [{'distance': '13268',\n",
       "    'duration': '10614',\n",
       "    'steps': [{'instruction': '向东北步行59米右转',\n",
       "      'orientation': '东北',\n",
       "      'road': [],\n",
       "      'distance': '59',\n",
       "      'duration': '47',\n",
       "      'polyline': '113.678963,23.633971;113.679371,23.634358',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿博学路向南步行79米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': '博学路',\n",
       "      'distance': '79',\n",
       "      'duration': '63',\n",
       "      'polyline': '113.679371,23.634358;113.679549,23.633971;113.679549,23.633971;113.679648,23.633694',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行131米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '131',\n",
       "      'duration': '105',\n",
       "      'polyline': '113.679648,23.633689;113.679627,23.633655;113.679596,23.633255;113.679596,23.633255;113.679596,23.633177;113.679596,23.633177;113.679596,23.63286;113.679596,23.63286;113.679596,23.632496',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向东步行100米右转',\n",
       "      'orientation': '东',\n",
       "      'road': [],\n",
       "      'distance': '100',\n",
       "      'duration': '80',\n",
       "      'polyline': '113.679592,23.632491;113.680586,23.632522',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行199米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '199',\n",
       "      'duration': '159',\n",
       "      'polyline': '113.680586,23.632522;113.680638,23.63214;113.680668,23.63174;113.680634,23.631541;113.68059,23.631437;113.68059,23.631437;113.680582,23.631411;113.680499,23.631241;113.680408,23.631094;113.680208,23.630842',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行159米左转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '159',\n",
       "      'duration': '127',\n",
       "      'polyline': '113.680204,23.630838;113.680035,23.630773;113.680035,23.630773;113.679905,23.630725;113.679644,23.630638;113.679644,23.630638;113.679362,23.630521;113.679271,23.63049;113.679219,23.630473;113.679201,23.630473;113.679201,23.630473;113.679032,23.63043;113.679032,23.63043;113.67898,23.630412;113.67888,23.630404;113.67888,23.630404;113.678711,23.630365',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行237米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '237',\n",
       "      'duration': '190',\n",
       "      'polyline': '113.678711,23.63036;113.678711,23.629978;113.678715,23.629766;113.678711,23.62934;113.678711,23.62934;113.678711,23.629193;113.678707,23.629132;113.678689,23.629084;113.678637,23.629023;113.678455,23.628924;113.678385,23.628863;113.678333,23.628776;113.678294,23.628611;113.678294,23.628611;113.678294,23.628537;113.678277,23.628372',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向东南步行103米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': [],\n",
       "      'distance': '103',\n",
       "      'duration': '82',\n",
       "      'polyline': '113.678273,23.628368;113.678329,23.628364;113.678572,23.628338;113.678685,23.628307;113.678685,23.628307;113.678741,23.62829;113.678845,23.628234;113.679045,23.628073;113.679145,23.627969',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行73米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '73',\n",
       "      'duration': '58',\n",
       "      'polyline': '113.679145,23.627964;113.679258,23.627652;113.67928,23.627526;113.679288,23.627431;113.679288,23.627322',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向东步行1461米向右前方行走',\n",
       "      'orientation': '东',\n",
       "      'road': [],\n",
       "      'distance': '1461',\n",
       "      'duration': '1169',\n",
       "      'polyline': '113.679288,23.627318;113.679905,23.627409;113.67997,23.627418;113.68003,23.627426;113.680165,23.627487;113.680165,23.627487;113.680191,23.627496;113.680256,23.627513;113.680273,23.627513;113.680334,23.6275;113.680373,23.627452;113.680503,23.627322;113.680595,23.627266;113.680625,23.627253;113.680655,23.62724;113.680738,23.627222;113.681029,23.627205;113.68105,23.627201;113.68115,23.627153;113.681189,23.627144;113.681272,23.627131;113.681402,23.627127;113.68145,23.627118;113.681532,23.627092;113.681576,23.627083;113.681671,23.627031;113.681706,23.626997;113.681775,23.626918;113.681866,23.62684;113.681914,23.626814;113.682018,23.626784;113.682148,23.626753;113.682357,23.62674;113.682357,23.62674;113.682539,23.62674;113.682661,23.626758;113.682773,23.62678;113.68296,23.626823;113.683186,23.626849;113.683898,23.626819;113.684232,23.626819;113.684431,23.626823;113.684835,23.62684;113.685039,23.626871;113.685408,23.626879;113.685799,23.626879;113.685985,23.626879;113.686354,23.626858;113.686354,23.626858;113.686476,23.626836;113.686806,23.626701;113.687122,23.626576;113.687313,23.626502;113.6874,23.626476;113.687665,23.626406;113.688125,23.626315;113.688611,23.626233;113.688733,23.626224;113.688841,23.626224;113.689032,23.626237;113.689106,23.626237;113.689154,23.626237;113.689262,23.626224;113.689453,23.626159;113.689505,23.626128;113.689618,23.626037;113.68964,23.62602;113.689696,23.625998;113.689796,23.625981;113.690039,23.625981;113.690174,23.625964;113.690313,23.625929;113.690313,23.625929;113.690464,23.625885;113.690864,23.625794;113.690916,23.62579;113.691016,23.625794;113.691059,23.625807;113.691146,23.625833;113.691189,23.625855;113.691298,23.625929;113.691359,23.62599;113.691372,23.626011;113.691441,23.626172;113.691497,23.626254;113.691549,23.626311;113.691571,23.626328;113.691632,23.626354;113.691723,23.626367;113.691762,23.62638;113.691823,23.626385;113.691901,23.626385;113.691931,23.626385;113.691975,23.626372;113.692135,23.626285;113.692244,23.626246;113.692509,23.626168;113.692587,23.626133;113.692747,23.626042',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行824米',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '824',\n",
       "      'duration': '659',\n",
       "      'polyline': '113.692747,23.626037;113.692799,23.625964;113.692891,23.625877;113.693142,23.625456;113.69316,23.625378;113.693155,23.625295;113.692986,23.625;113.692895,23.624826;113.692843,23.624661;113.692821,23.624557;113.692821,23.624427;113.692839,23.62418;113.692908,23.623589;113.69293,23.623446;113.692938,23.623307;113.692934,23.623247;113.692912,23.623199;113.692873,23.623151;113.692752,23.623025;113.6927,23.622951;113.692661,23.622856;113.692669,23.622639;113.692669,23.622561;113.692509,23.622062;113.692422,23.621923;113.692318,23.621793;113.692261,23.621697;113.692231,23.621628;113.692231,23.621628;113.692227,23.621584;113.692227,23.621471;113.692227,23.621471;113.692253,23.62135;113.692587,23.620343;113.692617,23.620239;113.692617,23.620156;113.6926,23.620026;113.692539,23.619813;113.692418,23.61934;113.692409,23.619253;113.692418,23.619032',\n",
       "      'action': [],\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿平岗罗洞街向南步行151米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': '平岗罗洞街',\n",
       "      'distance': '151',\n",
       "      'duration': '121',\n",
       "      'polyline': '113.692418,23.619028;113.692409,23.618932;113.692331,23.618772;113.692227,23.618585;113.692209,23.618533;113.692209,23.618477;113.692222,23.618342;113.692283,23.617912;113.692326,23.617708',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿平岗罗洞街向南步行92米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': '平岗罗洞街',\n",
       "      'distance': '92',\n",
       "      'duration': '74',\n",
       "      'polyline': '113.692326,23.617704;113.692287,23.617287;113.692218,23.616879',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿平岗罗洞街向南步行199米左转',\n",
       "      'orientation': '南',\n",
       "      'road': '平岗罗洞街',\n",
       "      'distance': '199',\n",
       "      'duration': '159',\n",
       "      'polyline': '113.692214,23.616875;113.691905,23.616337;113.691788,23.616211;113.691714,23.616098;113.691667,23.615994;113.691628,23.615859;113.691576,23.615577;113.691502,23.615239',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向东南步行293米左转',\n",
       "      'orientation': '东南',\n",
       "      'road': [],\n",
       "      'distance': '293',\n",
       "      'duration': '234',\n",
       "      'polyline': '113.691497,23.615234;113.691671,23.615256;113.691992,23.615334;113.692062,23.615343;113.692153,23.615343;113.692274,23.615352;113.692418,23.615404;113.692526,23.615421;113.6926,23.615404;113.692687,23.615339;113.692769,23.615286;113.692808,23.615247;113.692891,23.615204;113.692982,23.615169;113.69303,23.615169;113.693073,23.615187;113.693103,23.615187;113.693138,23.615169;113.693212,23.615095;113.693212,23.615095;113.693481,23.614813;113.693615,23.61464;113.693633,23.614592;113.693646,23.61444;113.693646,23.614405;113.693646,23.614388;113.69362,23.61431',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向东北步行734米',\n",
       "      'orientation': '东北',\n",
       "      'road': '934县道',\n",
       "      'distance': '734',\n",
       "      'duration': '587',\n",
       "      'polyline': '113.693615,23.614306;113.694015,23.614332;113.694015,23.614332;113.69454,23.614375;113.69454,23.614375;113.695386,23.61444;113.695616,23.614475;113.695942,23.614553;113.697018,23.61487;113.697227,23.61497;113.697821,23.615404;113.698416,23.615816;113.698416,23.615816;113.698997,23.616285;113.69934,23.616515;113.700004,23.616931',\n",
       "      'action': [],\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向东步行344米向右前方行走',\n",
       "      'orientation': '东',\n",
       "      'road': '934县道',\n",
       "      'distance': '344',\n",
       "      'duration': '275',\n",
       "      'polyline': '113.700004,23.616931;113.700139,23.617027;113.700217,23.617053;113.700299,23.61707;113.700734,23.617101;113.701736,23.617188;113.701949,23.617222;113.702083,23.61727;113.702083,23.61727;113.702214,23.617335;113.702214,23.617335;113.702995,23.617847;113.702995,23.617847;113.703108,23.617938',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向东步行474米直行',\n",
       "      'orientation': '东',\n",
       "      'road': '934县道',\n",
       "      'distance': '474',\n",
       "      'duration': '379',\n",
       "      'polyline': '113.703108,23.617938;113.704549,23.618125;113.704549,23.618125;113.704948,23.618168;113.704948,23.618168;113.70503,23.618173;113.70503,23.618173;113.705291,23.618194;113.705291,23.618194;113.706441,23.618325;113.706441,23.618325;113.707036,23.618372;113.707296,23.618398;113.707296,23.618398;113.707509,23.618416;113.70776,23.618442',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿中田石井街向东步行639米直行',\n",
       "      'orientation': '东',\n",
       "      'road': '中田石井街',\n",
       "      'distance': '639',\n",
       "      'duration': '511',\n",
       "      'polyline': '113.70776,23.618442;113.708325,23.618507;113.709028,23.618559;113.70924,23.618585;113.70924,23.618585;113.709431,23.618641;113.710217,23.618902;113.711285,23.619245;113.711324,23.619262;113.711324,23.619262;113.711727,23.619397;113.711975,23.619501;113.711975,23.619501;113.712348,23.619679;113.712348,23.619679;113.712895,23.619926;113.712895,23.619926;113.713416,23.620174;113.713546,23.620226;113.713681,23.620273',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向东步行157米直行',\n",
       "      'orientation': '东',\n",
       "      'road': '934县道',\n",
       "      'distance': '157',\n",
       "      'duration': '126',\n",
       "      'polyline': '113.713681,23.620273;113.714049,23.620395;113.714049,23.620395;113.714436,23.620508;113.714835,23.620629;113.714987,23.620681;113.714987,23.620681;113.715139,23.620755',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃田岗街向东步行2889米直行',\n",
       "      'orientation': '东',\n",
       "      'road': '桃田岗街',\n",
       "      'distance': '2889',\n",
       "      'duration': '2311',\n",
       "      'polyline': '113.715139,23.620755;113.715786,23.621107;113.716102,23.621259;113.716328,23.62135;113.717049,23.621541;113.71799,23.62178;113.718963,23.622031;113.718963,23.622031;113.719601,23.622201;113.720321,23.622378;113.720321,23.622378;113.720747,23.622478;113.720747,23.622478;113.720955,23.622509;113.721111,23.622509;113.721311,23.6225;113.721662,23.622452;113.722973,23.622174;113.722973,23.622174;113.723494,23.622062;113.725126,23.621723;113.725126,23.621723;113.726141,23.621506;113.726988,23.621328;113.726988,23.621328;113.72753,23.621207;113.72753,23.621207;113.727726,23.621163;113.727726,23.621163;113.728155,23.621085;113.728155,23.621085;113.728568,23.621003;113.728789,23.620955;113.728789,23.620955;113.729019,23.620911;113.729019,23.620911;113.729588,23.620786;113.730061,23.620707;113.730412,23.620681;113.730564,23.620677;113.730681,23.620677;113.731345,23.62072;113.731345,23.62072;113.731819,23.620768;113.732031,23.620803;113.732161,23.620838;113.732595,23.621007;113.733138,23.621241;113.733138,23.621241;113.733459,23.621376;113.733602,23.621419;113.733776,23.621445;113.734214,23.621489;113.734449,23.621493;113.734722,23.62148;113.736723,23.621306;113.736723,23.621306;113.737105,23.621272;113.737105,23.621272;113.737179,23.621263;113.737179,23.621263;113.737517,23.621241;113.737517,23.621241;113.737669,23.621228;113.737964,23.621224;113.738121,23.621237;113.738121,23.621237;113.738273,23.62128;113.738607,23.621389;113.738737,23.621441;113.738737,23.621441;113.738876,23.621493;113.739041,23.621541;113.739249,23.621584;113.739249,23.621584;113.739965,23.621706;113.740408,23.621801;113.741536,23.621966;113.741888,23.62201;113.742062,23.622018;113.7423,23.622014;113.742674,23.621979',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向东步行1219米向左前方行走',\n",
       "      'orientation': '东',\n",
       "      'road': '934县道',\n",
       "      'distance': '1219',\n",
       "      'duration': '975',\n",
       "      'polyline': '113.742674,23.621975;113.743207,23.621949;113.743346,23.621957;113.743572,23.622005;113.743772,23.622062;113.744444,23.6223;113.744536,23.622313;113.744627,23.622322;113.744709,23.622313;113.74474,23.622305;113.744826,23.622261;113.745078,23.622079;113.745139,23.622014;113.745182,23.621944;113.745273,23.621749;113.745334,23.621658;113.745373,23.621623;113.745443,23.621584;113.745503,23.621571;113.745582,23.621576;113.745642,23.621593;113.745777,23.621658;113.746267,23.621957;113.746497,23.622109;113.746662,23.622248;113.74674,23.622292;113.746901,23.622357;113.747665,23.622617;113.74786,23.622695;113.74796,23.622747;113.748138,23.622882;113.748138,23.622882;113.748511,23.623194;113.748763,23.623429;113.748915,23.623559;113.749015,23.623611;113.749097,23.623633;113.749188,23.623646;113.749275,23.623646;113.749371,23.623615;113.749479,23.623563;113.749531,23.623524;113.749592,23.623468;113.749618,23.623429;113.749618,23.623429;113.750004,23.622826;113.750234,23.622496;113.750404,23.622283;113.750534,23.62204;113.750586,23.621975;113.750686,23.621897;113.750846,23.621832;113.751411,23.621628;113.751662,23.621554;113.751766,23.621497;113.752075,23.621254;113.752166,23.621194;113.752209,23.621172;113.75227,23.62115',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向东步行780米向右前方行走',\n",
       "      'orientation': '东',\n",
       "      'road': '934县道',\n",
       "      'distance': '780',\n",
       "      'duration': '624',\n",
       "      'polyline': '113.75227,23.621146;113.7524,23.621133;113.752582,23.621133;113.752582,23.621133;113.752752,23.621146;113.752865,23.621172;113.752943,23.621202;113.753125,23.621345;113.753668,23.621628;113.753898,23.62174;113.754002,23.621784;113.754123,23.621806;113.754223,23.621806;113.754332,23.621788;113.754514,23.621719;113.754605,23.621697;113.754683,23.621697;113.754735,23.621697;113.754818,23.621732;113.754844,23.62174;113.754913,23.621793;113.754987,23.621875;113.755087,23.622014;113.75523,23.622244;113.75523,23.622244;113.755321,23.622313;113.755386,23.622339;113.755447,23.622352;113.75553,23.622352;113.755699,23.622313;113.75579,23.622309;113.755812,23.622309;113.75589,23.622335;113.755933,23.622374;113.756063,23.622517;113.756133,23.622578;113.756185,23.622609;113.756263,23.62263;113.756298,23.622635;113.756354,23.622635;113.756385,23.622635;113.756437,23.622613;113.756458,23.622582;113.756476,23.622535;113.756476,23.622509;113.756463,23.622448;113.756328,23.622266;113.756302,23.622218;113.756298,23.622148;113.756306,23.622079;113.756328,23.62204;113.756354,23.622018;113.756424,23.621997;113.756454,23.621997;113.756536,23.622014;113.75691,23.622109;113.757183,23.622192;113.757244,23.622196;113.757361,23.622166;113.757491,23.622101;113.757635,23.622001;113.757704,23.621979;113.757734,23.621979;113.757765,23.621984;113.757817,23.622023;113.757834,23.62207;113.757873,23.622257;113.757908,23.622357;113.757925,23.622378;113.757977,23.622418;113.758016,23.622422',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向东北步行1872米到达目的地',\n",
       "      'orientation': '东北',\n",
       "      'road': '934县道',\n",
       "      'distance': '1872',\n",
       "      'duration': '1498',\n",
       "      'polyline': '113.758016,23.622422;113.758047,23.622422;113.758069,23.622418;113.758099,23.622396;113.758116,23.62237;113.758116,23.62237;113.75816,23.622292;113.75819,23.622201;113.75819,23.622088;113.75816,23.621793;113.75816,23.62171;113.758199,23.621602;113.758247,23.621558;113.758316,23.621506;113.758437,23.62145;113.758572,23.621406;113.758772,23.621363;113.758941,23.621341;113.759002,23.621328;113.759032,23.621315;113.759054,23.621302;113.759093,23.621263;113.759106,23.621237;113.759123,23.621176;113.759123,23.621155;113.759097,23.62105;113.759097,23.621024;113.759102,23.620955;113.759132,23.620911;113.759227,23.620812;113.759353,23.620734;113.759497,23.620647;113.759575,23.620608;113.759648,23.62059;113.759679,23.62059;113.759748,23.620608;113.759787,23.620634;113.7598,23.620664;113.7598,23.620729;113.759744,23.620855;113.759735,23.62092;113.759735,23.620998;113.759735,23.620998;113.759757,23.621185;113.759922,23.621706;113.759961,23.621892;113.759978,23.621997;113.759978,23.622187;113.759983,23.622326;113.760022,23.622357;113.760078,23.622374;113.760161,23.622413;113.760269,23.622422;113.760291,23.622426;113.760321,23.622439;113.760343,23.622452;113.76036,23.622478;113.76036,23.622478;113.760365,23.622496;113.760365,23.622543;113.760334,23.622617;113.760278,23.622678;113.760113,23.622834;113.760022,23.622934;113.759957,23.623034;113.759861,23.623342;113.759805,23.623481;113.759714,23.623672;113.759661,23.623854;113.759666,23.623941;113.759679,23.623997;113.759718,23.624102;113.759983,23.624592;113.760109,23.62487;113.760204,23.625035;113.760352,23.625213;113.761159,23.626042;113.76122,23.626085;113.761267,23.626085;113.761319,23.626081;113.761359,23.626059;113.761411,23.625946;113.761419,23.625916;113.761428,23.625864;113.761428,23.625807;113.761424,23.625773;113.761263,23.625421;113.761111,23.625043;113.76102,23.624839;113.761003,23.624748;113.761003,23.624722;113.761016,23.624679;113.761046,23.624631;113.76125,23.624436;113.761337,23.624384;113.761337,23.624384;113.76174,23.624136;113.761944,23.623989;113.762066,23.623876;113.762214,23.623711;113.762296,23.623633;113.762387,23.623572;113.762535,23.623524;113.76273,23.623472;113.76286,23.623407;113.76296,23.623338;113.763164,23.623142;113.763203,23.623095;113.763203,23.623095;113.763251,23.623043;113.763433,23.622743;113.763503,23.622661;113.763602,23.622591;113.763655,23.622587;113.763676,23.622587;113.763707,23.622609;113.763707,23.622609;113.763724,23.622635;113.763724,23.622682;113.76365,23.622839;113.76362,23.622947;113.763607,23.623112;113.763589,23.623268;113.763559,23.623451;113.763559,23.623451;113.763446,23.623898;113.763407,23.623971;113.763359,23.624041;113.763168,23.62421;113.763116,23.62428;113.763095,23.624332;113.763056,23.62444;113.763034,23.624544;113.763034,23.624631;113.763038,23.624648;113.763038,23.624648;113.763051,23.624744;113.763103,23.624839;113.763251,23.625052;113.763281,23.6251',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'walk_type': '0'}]}]}}"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 从南方学院步行到广东省广州市温泉镇石门国家森林公园\n",
    "walking('113.679000,23.633941','113.763124,23.625183')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "abc06dea",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
